package com.google.code.roadmap.web.domain;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.google.code.roadmap.web.domain.base.BaseObject;

/**
 * @author ParkHaeCheol
 * 
 */
public class RoadMap extends BaseObject {

	private static final long serialVersionUID = 1L;

	private Integer idNum;

	private String fileName;

	private RoadMap north;

	private RoadMap south;

	private RoadMap east;

	private RoadMap west;

	private RoadMap nw;

	private RoadMap ne;

	private RoadMap sw;

	private RoadMap se;

	private String comment;
	

	public RoadMap getNorth() {
		return north;
	}

	public void setNorth(RoadMap north) {
		this.north = north;
	}

	public RoadMap getSouth() {
		return south;
	}

	public void setSouth(RoadMap south) {
		this.south = south;
	}

	public RoadMap getEast() {
		return east;
	}

	public void setEast(RoadMap east) {
		this.east = east;
	}

	public RoadMap getWest() {
		return west;
	}

	public void setWest(RoadMap west) {
		this.west = west;
	}

	public RoadMap getNw() {
		return nw;
	}

	public void setNw(RoadMap nw) {
		this.nw = nw;
	}

	public RoadMap getNe() {
		return ne;
	}

	public void setNe(RoadMap ne) {
		this.ne = ne;
	}

	public RoadMap getSw() {
		return sw;
	}

	public void setSw(RoadMap sw) {
		this.sw = sw;
	}

	public RoadMap getSe() {
		return se;
	}

	public void setSe(RoadMap se) {
		this.se = se;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	@Override
	public boolean equals(Object o) {

		if (o instanceof RoadMap == false) {
			return false;
		}

		if (this == o) {
			return true;
		}

		RoadMap rhs = (RoadMap) o;

		EqualsBuilder equb = new EqualsBuilder();
		equb.append(idNum, rhs.getIdNum());
		equb.append(fileName, rhs.getFileName());

		return equb.isEquals();
	}

	@Override
	public int hashCode() {

		HashCodeBuilder hashcode = new HashCodeBuilder(3, 37);
		hashcode.append(idNum);
		hashcode.append(fileName);

		return hashcode.toHashCode();
	}

	@Override
	public String toString() {

		ToStringBuilder tob = new ToStringBuilder(this,
				ToStringStyle.MULTI_LINE_STYLE);

		tob.append("idNum", idNum);
		tob.append("fileName", fileName);

		return tob.toString();

	}

	public Integer getIdNum() {
		return idNum;
	}

	public void setIdNum(Integer idNum) {
		this.idNum = idNum;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

}
